package com.framework.yhbapi.config;

import com.framework.yhbapi.file.SessionFile;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 功能描述:
 *
 * @author ck
 * @date 2018/10/18 09:53
 */
@Configuration
public class WebAppConfigurer implements WebMvcConfigurer {


	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		// 可添加多个
		registry.addInterceptor(new SessionFile()).addPathPatterns("/**")
		//不需要拦截配置  doc-api 文旦、支付回调等路径
		.excludePathPatterns("/doc.html","/webjars/**","/swagger-resources/**","/notValidate/**");
	}
}
